<template>
    <div class="header">
        <!-- 左边 -->
        <div class="left">
          <span class="head">叩丁狼商品管理系统</span>
   <i class="el-icon-menu" @click="iconClick"></i>
        </div>
      <!-- 右边 -->
      <div>
     
<el-dropdown split-button type="primary" @command="handleClick" >
  admin
  <el-dropdown-menu slot="dropdown">
    <el-dropdown-item class="el-dropdown-menu_item" command="a" >退出登录</el-dropdown-item>
  </el-dropdown-menu>
</el-dropdown>
      </div>
    </div>
</template>

<script>
export default {
    data () {
        return {
 
        }
    },
    methods:{
         handleClick() {
       this.$router.push("/login")
      },
      //点击图标
      iconClick(){
        this.$store.commit("change")
      }
    }
}
</script>
 
<style lang = "less" scoped>
    .header{
     height: 70px;
     display: flex;
     line-height: 70px;
     background-color:#389cff;
    padding: 0 15px;
    justify-content: space-between;
    .left{
    font-size: 22px;
    color: #fff;
  .head{
    margin-right:20px;
  }
    }
    }
   
  .el-dropdown-menu_item{
    list-style: none;
    line-height: 36px;
    font-size: 14px;
    color: #606266;
    cursor: pointer;
    outline: 0;
  }
</style>